<div class="userTournaments index">
	<?php if(empty($tournament)):?>
	<h2><?php __('Participantes por Torneo');?></h2>
	<?php else:?>
	<h2><?php __('Participantes por Torneo<br />'.$tournament['Tournament']['name']);?></h2>
	<?php endif;?>
<p>
<?php
echo $paginator->counter(array(
'format' => __('Pagina %page% of %pages%, Mostrando %current% registro de %count% totales, primer registro %start%, termina en %end%', true)
));
?></p>
<table cellpadding="0" cellspacing="0">
<tr>
	<!--<th><?php echo $paginator->sort('user_id');?></th>-->
	<th><?php echo $paginator->sort('WCG-ID');?></th>
	<th><?php echo $paginator->sort('Participante');?></th>
	<?php if(empty($tournament)):?>
	<th><?php echo $paginator->sort('Torneo');?></th>
	<?php endif;?>
	<th><?php echo $paginator->sort('Deposito');?></th>
	<th><?php echo $paginator->sort('Equipo');?></th>
	<th><?php echo $paginator->sort('Capitan');?></th>
	<th><?php echo $paginator->sort('Miembro');?></th>
	<th><?php echo $paginator->sort('Cosplay Tema');?></th>
	<th><?php echo $paginator->sort('Cosplay Equipo');?></th>
	<th><?php echo $paginator->sort('Estatus');?></th>
	<!--<th><?php echo $paginator->sort('created');?></th>
	<th><?php echo $paginator->sort('modified');?></th>-->
	<!--<th class="actions"><?php __('Actions');?></th>-->
</tr>
<?php
$i = 0;
foreach ($userTournaments as $userTournament):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<!--<td>
			<?php //echo $userTournament['UserTournament']['id']; ?>
		</td>-->
		<td width="150">
			<?php echo $html->link('WCGVE'.str_pad($userTournament['User']['wcgid'], 4, "0", STR_PAD_LEFT), array('controller'=> 'users', 'action'=>'edit', $userTournament['User']['id'])); ?>
		</td>
		<td width="150">
			<?php echo $html->link(trim($userTournament['User']['name'].' '.$userTournament['User']['lastname']), array('controller'=> 'users', 'action'=>'edit', $userTournament['User']['id'])); ?>
		</td>
		<?php if(empty($tournament)):?>
		<td>
			<?php echo $html->link($userTournament['Tournament']['name'], array('controller'=> 'tournaments', 'action'=>'edit', $userTournament['Tournament']['id'])); ?>
		</td>
		<?php endif;?>
		<td>
			<?php echo $html->link($userTournament['Deposit']['number'], array('controller'=> 'deposits', 'action'=>'edit', $userTournament['Deposit']['id'])); ?>
		</td>
		<td width="150">
			<?php echo $html->link($userTournament['Tournamentgroup']['name'], array('controller'=> 'tournamentgroups', 'action'=>'view', $userTournament['Tournamentgroup']['id'])); ?>
		</td>
		<td>
			<?php echo ($userTournament['UserTournament']['captaingroup'])?'SI':'NO'; ?>
		</td>
		<td>
			<?php echo ($userTournament['UserTournament']['memberstatus'])?'SI':'NO'; ?>
		</td>
		<td>
			<?php echo $userTournament['UserTournament']['cosplaytheme']; ?>
		</td>
		<td>
			<?php echo $userTournament['UserTournament']['cosplayteam']; ?>
		</td>
		<td>
			<?php echo ($userTournament['UserTournament']['status'])?'Activo':'Inactivo'; ?>
		</td>
		<!--<td>
			<?php echo $userTournament['UserTournament']['created']; ?>
		</td>
		<td>
			<?php echo $userTournament['UserTournament']['modified']; ?>
		</td>-->
		<!--<td class="actions">
			<?php //echo $html->link(__('View', true), array('action'=>'view', $userTournament['UserTournament']['id'])); ?>
			<?php //echo $html->link(__('Edit', true), array('action'=>'edit', $userTournament['UserTournament']['id'])); ?>
			<?php //echo $html->link(__('Delete', true), array('action'=>'delete', $userTournament['UserTournament']['id']), null, sprintf(__('Are you sure you want to delete # %s?', true), $userTournament['UserTournament']['id'])); ?>
		</td>-->
	</tr>
<?php endforeach; ?>
</table>
</div>
<div class="paging">
	<?php echo $paginator->prev('<< '.__('Anterior', true), array(), null, array('class'=>'disabled'));?>
 | 	<?php echo $paginator->numbers();?>
	<?php echo $paginator->next(__('Siguiente', true).' >>', array(), null, array('class'=>'disabled'));?>
</div>
<!--<div class="actions">
	<ul>
		<li><?php //echo $html->link(__('New UserTournament', true), array('action'=>'add')); ?></li>
		<li><?php //echo $html->link(__('List Users', true), array('controller'=> 'users', 'action'=>'index')); ?> </li>
		<li><?php //echo $html->link(__('New User', true), array('controller'=> 'users', 'action'=>'add')); ?> </li>
		<li><?php //echo $html->link(__('List Tournaments', true), array('controller'=> 'tournaments', 'action'=>'index')); ?> </li>
		<li><?php //echo $html->link(__('New Tournament', true), array('controller'=> 'tournaments', 'action'=>'add')); ?> </li>
		<li><?php //echo $html->link(__('List Tournamentgroups', true), array('controller'=> 'tournamentgroups', 'action'=>'index')); ?> </li>
		<li><?php //echo $html->link(__('New Tournamentgroup', true), array('controller'=> 'tournamentgroups', 'action'=>'add')); ?> </li>
		<li><?php //echo $html->link(__('List Deposits', true), array('controller'=> 'deposits', 'action'=>'index')); ?> </li>
		<li><?php //echo $html->link(__('New Deposit', true), array('controller'=> 'deposits', 'action'=>'add')); ?> </li>
	</ul>
</div>-->
